package com.eric.rabbitmq.topic;

import com.eric.rabbitmq.config.RabbitTopicConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author chenw-i
 * @version 1.0.0
 * @ClassName TopicSender.java
 * @Description TODO
 * @createTime 2020年07月29日 18:53:00
 */
@Component
public class TopicReceiver {

    @RabbitHandler
    @RabbitListener(queues = RabbitTopicConfig.QUEUE_ORDER)
    public void receiverOrder(String msg){
        System.out.println("receiverOrder => " + msg);
    }


    @RabbitHandler
    @RabbitListener(queues = RabbitTopicConfig.QUEUE_COMMON)
    public void receiverCommon(String msg){
        System.out.println("receiverCommon => " + msg);
    }
}
